package rpcx

import (
	"fmt"
	"log"
	"net/rpc"
)

func Client() {
	client, err := rpc.DialHTTP("tcp", "127.0.0.1:1234")
	if err != nil {
		log.Fatal("dialing:", err)
	}

	args := &RequestArgs{Name: "mirchen", Address: "北京永泰庄地铁站"}
	var reply string
	err = client.Call("ServerSayHello.GetResponseStr", args, &reply)
	if err != nil {
		log.Fatal("arith error:", err)
	}
	fmt.Printf("called: ServerSayHello.GetResponseStr()=%s", reply)
}
